#ifndef LAURIN_NETWORK_H_
#define LAURIN_NETWORK_H_

#include "laurin-ip-range.h"
#include "laurin-80211-station.h"
#include "laurin-access-point.h"
#include "laurin-network-client.h"
#include <glibmm/ustring.h>
#include <list>

class LaurinNetworkSet;

class Laurin80211Network
{
	friend class LaurinNetworkSet;

	public:

		virtual ~Laurin80211Network();

		Glib::ustring getNetworkSSID() const;


		void addStation(const Laurin80211Station& station, bool checkPresent = true);
		void addAccessPoint(const LaurinAccessPoint& accessPoint, bool checkPresent = true);

		bool isAccessPointPresent(u_int8_t* bssid);
		bool isStationPresent(u_int8_t* mac);


		const std::list<Laurin80211Station>& getStations() const;
		const std::list<LaurinAccessPoint>& getAccessPoint() const;

		int getNumberOfStations() const;
		int getNumberOfAccessPoint() const;

		//short isMACPresent(u_int8_t* op1, u_int8_t* op2);

	private:

		Laurin80211Network(const Glib::ustring& ssid);

		Glib::ustring _ssid;

		std::list<Laurin80211Station> _stations;
		std::list<LaurinAccessPoint> _accessPoints;

};



class LaurinNetworkSet
{

	public:

		LaurinNetworkSet();
		virtual ~LaurinNetworkSet();

		Laurin80211Network* searchNetworkFromSSID(const Glib::ustring& ssid);
		Laurin80211Network* searchNetworkFromBSSID(u_int8_t* bssid);

		Laurin80211Network* addNetwork(const Glib::ustring& ssid, bool checkPresent = true);

		int getNumberOfNetworks() const;
		const std::list<Laurin80211Network>& getNetworks() const;


	private:

		std::list<Laurin80211Network> _networks;
};


#endif
